<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-04-15 09:54:49
         compiled from "C:/wamp/www/project.adm.uppii/admin/aplications/views/perfil\profile.tpl" */ ?>
<?php /*%%SmartyHeaderCode:21533552e5f992ff490-80207924%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '72aa3635a082a762cd102880247a53340069a8eb' => 
    array (
      0 => 'C:/wamp/www/project.adm.uppii/admin/aplications/views/perfil\\profile.tpl',
      1 => 1427736807,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '21533552e5f992ff490-80207924',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'obj_user' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_552e5f99433e62_63636708',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_552e5f99433e62_63636708')) {function content_552e5f99433e62_63636708($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<section id='perfil' class='lt_padding_15x rt_padding_15x'>
    <div class='row'>
        <div class="col-md-12">
            <h2 class="b_margin_15x">Perfil</h2>
            <form action="<?php echo @constant('URLDOMINIOADMIN');?>
aplications/actions/upload.act.php?acao=crop&p=perfil" method="post" id="frm_profile" enctype="multipart/form-data">
                <input type='hidden' name='id_user' value="<?php echo $_smarty_tpl->tpl_vars['obj_user']->value[0]->id;?>
" />
                
                
                <input type="hidden" name='src' id='src' />
                <input type='hidden' name='cropW' id='cropW'>
                <input type='hidden' name='cropH' id='cropH'>
                <input type='hidDen' name='cropX' id='cropX'>
                <input type='hidDen' name='cropY' id='cropY'>
                <textarea class="hidden" name='binaryImg' id='binaryImg' cols="40" rows="10"></textarea>
                
                
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right font-bold" for="fileInput">Imagem</label>
                    <div class="col-md-10">
                        <div class='media-content clearfix'>
                            <div class='media-avatar bgGrayDegrd' id="media_file">
                                <div class="media_img">
                                    <img src='<?php echo $_smarty_tpl->tpl_vars['obj_user']->value[0]->imagem;?>
' alt='usuario' />
                                </div>
                            </div>
                            <div id='mediaContainer' class='media-btn-upload tp' data-placement="right" data-original-title="Trocar imagem" >
                                
                                <a id='upload' href='javascript:;'>
                                    <i class='fa fa-camera'></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right font-bold" for="nome">Nome Completo</label>
                    <div class="col-md-10">
                        <div class="row">
                            <div class="col-sm-5">
                                <input type="text" value="<?php echo $_smarty_tpl->tpl_vars['obj_user']->value[0]->nome;?>
" name="nome" id="nome" class="form-control" placeholder="Digite seu nome" />
                            </div>
                            <div class="col-sm-5">
                                <input type="text" value="<?php echo $_smarty_tpl->tpl_vars['obj_user']->value[0]->sobrenome;?>
" name="sobrenome" id="sobrenome" class="form-control form-size-m" placeholder="Digite seu sobrenome" />
                            </div>
                        </div>
                    </div>
                </div>
                 <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right font-bold" for="email">Seu e-mail</label>
                    <div class="col-md-10">
                        <div class="row">
                            <div class="col-sm-10">
                                <input type="text" value="<?php echo $_smarty_tpl->tpl_vars['obj_user']->value[0]->email;?>
" name="email" id="email" class="form-control" placeholder="Digite seu email" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group clearfix">
                    <label class="control-label col-sm-2 text-right font-bold" for="senha">Sua senha</label>
                    <div class="col-md-10">
                        <div class="row">
                            <div class="col-sm-10">
                                <input type="password" value='<?php echo $_smarty_tpl->tpl_vars['obj_user']->value[0]->senha;?>
' name="senha" id="senha" class="form-control" placeholder="Digite sua senha" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <button type="submit" class="btn btn-default">
                            <i class="fa fa-save"></i>
                            Salvar altera&ccedil;&otilde;es
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>

<?php echo '<script'; ?>
 type="text/javascript">
     
    jQuery(function(){
        
        /*elemento input que recebera o valor da url da imagem(caminho absoluto da imagem)*/
        var $_src = jQuery("#src");
        
        /*processo de upload da imagem */
        jQuery("#upload").uploadFile({
            autoStart:true,
            url:"<?php echo @constant('URLDOMINIOADMIN');?>
aplications/actions/upload.act.php?acao=upload&p=perfil",
            btnAddFile:'upload',
            progress:function(up,file){
                /*var percent = file.percent;*/
                /*$("#media_loader").removeClass('fa-photo').addClass('fa-spin fa-spinner');*/
                
            },
            callback:function(up,file,obj){
                var $_res = jQuery.parseJSON(obj.response);
                if($_res.status){
                    jQuery('.media_img').html("<img src='"+$_res.url+"' id='cropimgbox' />");
                    $_src.val($_res.url);
                    jQuery("#cropimgbox").cropbox({ width:120, height:100 }).on('cropbox',function(evt,result,img){
                        jQuery("#cropW").val(result.cropW);
                        jQuery("#cropH").val(result.cropH);
                        jQuery("#cropX").val(result.cropX);
                        jQuery("#cropY").val(result.cropY);
                        jQuery("#binaryImg").val(img.getDataURL());
                    });
                }
            }
        });
                
        //envia os dados para recortar a imagem
        var optionsCrop = {
            beforeSubmit:function(arr, $form, options){
                //jQuery("#loadCrop").removeClass('hidden').addClass("show");
            },
            success:function(responseText, statusText, xhr, $form){
            }
        }
        jQuery("#frm_profile").ajaxForm(optionsCrop);
    });
<?php echo '</script'; ?>
>


<?php echo $_smarty_tpl->getSubTemplate ('footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
